package com.jiyun.twostudio.controller;

import com.apis.studio.StudioApi;
import com.jiyun.twostudio.service.StudioService;
import com.usian.model.comment.CommentLikeDto;
import com.usian.model.comment.CommentSaveDto;
import com.usian.model.comment.pojos.ApCommentLike;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("studio/api/vi")
public class StudioController implements StudioApi {

    @Resource
    private StudioService studioService;

    @PostMapping("pinglun")
    @Override
    public ResponseResult pinglun(@RequestBody CommentSaveDto dto) {
        return studioService.pinglun(dto);
    }

    @PostMapping("dianzan")
    public ResponseResult dianzan(@RequestBody CommentLikeDto dto) {
        return studioService.dianzan(dto);
    }

    @PostMapping("pinglunlist")
    public ResponseResult pinglunlist(@RequestBody CommentSaveDto dto) {
        return studioService.pinglunlist(dto);
    }

}
